<template>
    <div>
        {{ title }}
    </div>
    <button @click="openModalJS">打开弹框(js)</button>
</template>
<script setup>
import { ref, inject } from 'vue';
let title = ref('这是login页面')

const openDialog = inject('OPENDIALOG');
const openModalJS = () => {
    openDialog({
        title: '标题',
        content: '内容'
    });
}
</script>